import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
/**
 *
 * @author Ayad Musa och Ehab Rada
 */
public class Task2 {
    
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        int x = 0;
        int i = 0;
        int xy = 1;


        while (x == 0) {

            System.out.println("Enter the value of X: ");
            int number1 = input.nextInt();
                        System.out.println("Enter the value of ooo: ");

            x = 1;

            if (number1 > 9 || number1 < 1) {
                System.out.println("this is invald number ");
                x = 0;

            } else {
                System.out.println("The X Value is : " + number1);
            }

            while (x == 1) {

                System.out.println("Enter the value of y:  ");
                int number2 = input.nextInt();

                if (number2 > 9 || number2 < 1) {
                    System.out.println("The  Value is invalid: ");
                    x = 1;


                } else {
                    for (i = 1; i <= number2; i++) {
                        xy = xy * number1;
                        
                    }

                    System.out.println("the  value is:  " + xy);
                    break;
                }
            }
        }
    }
}
